package com.feng.entity.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.feng.entity.Account;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
public class AccountAndArticleVo {

    private String id;

    //用户昵称
    private String nickname;

    //性别
    private String sex;
    //头像
    private String avatar;
    //创建时间
    @JsonFormat(pattern = "yyyy年MM月dd日")
    private Date createTime;

    private Integer count;

    List<ArticleListVo> articleVos;

    public AccountAndArticleVo(Account account){
        this.id = account.getId();
        this.nickname = account.getNickname();
        this.sex = account.getSex();
        this.avatar = account.getAvatar();
        this.createTime = account.getCreateTime();
    }
}
